<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/jquery.min.js"></script>
    <style>
        .more {
            display: inline-block;
            position: absolute;
            height: 80px;
            width: 80px;
            border: solid;
            text-align: center;
        }

        .btn1 {
            pointer-events: none;
        }
    </style>
</head>

<body>
    <p><button onclick="showUp(event)" value="666" class="btn1">hello</button></p>
    <p><button onclick="showUp(event)" value="666">hello</button></p>
    <p><button onclick="closeIt()" value="666">hello</button></p>
    <script>
        function showUp(e) {
            $(".more").remove()
            let morePad = document.createElement('div')
            morePad.className = 'more'
            morePad.innerHTML = "<button onclick='hello(" + e.target.value + ")'>action1</button><button onclick='closeIt()'>action2</button>"
            $(e.target).after(morePad);
            $(".more").css({
                'left': e.target.offsetLeft + 40 + 'px',
                'top': e.target.offsetTop + 10 + 'px'
            })
            $(".btn1").css('pointer-events', 'auto')

        }

        function hello(sth) {
            alert(sth)
        }

        function closeIt() {
            console.log("!")
            $(".more").remove()
        }
    </script>
</body>

</html>